<script setup>
import { inject } from 'vue'
import Son from './Son.vue'
// 后代组件通过inject接收provide传递的数据 接收的时候可以随意起名字
const moneyFather = inject('money') 
</script>

<template>
  <div class="father-page">
    father: {{moneyFather}}

    <Son></Son>
  </div>
</template>

<style scoped>
.father-page {
  width: 500px;
  height: 500px;
  border: 1px solid red;
}

</style>
